package com.sbcb.common;

import com.sbcb.common.applicationcontext.SpringUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

//利用SpringBoot启动类中run方法返回的Context，存到项目静态变量中，使用自定义工具类进行调用。
@SpringBootApplication
public class CommonApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(CommonApplication.class, args);
        SpringUtil.setApplicationContext(applicationContext);
    }
}
